package cn.mianshiyi.example;

import cn.mianshiyi.braumclient.annotation.EnableEasyRateLimiter;
import cn.mianshiyi.braumdatasource.nacos.NacosDataSource;
import com.alibaba.nacos.api.exception.NacosException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication( scanBasePackages = "cn.mianshiyi.example")
@EnableEasyRateLimiter
public class ExampleApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class, args);
        try {
            //采用外部动态配置规则方式
            new NacosDataSource("BRAUM", "cn.mianshiyi.braum.nacos.datasource", "localhost:8848");
        } catch (NacosException e) {
            e.printStackTrace();
        }
    }

}
